package com.example.planetexploder.basepresenter;

import android.content.Context;
import android.util.Log;

import com.example.planetexploder.bean.maindata.BookInfo;
import com.example.planetexploder.constants.LogConst;
import com.example.planetexploder.model.dao.Dao;

/**
 * Presenter层修改分类
 * @author 宋熙然
 */
public class PClassification {

    private Dao dao;

    public PClassification(Context context) {
        this.dao = new Dao(context);
    }

    /**
     * 对摘抄集修改分类
     * @param bookInfo 摘抄集信息
     * @param tag1 若用户没有勾选，则传入0
     * @param tag2 若用户没有勾选，则传入0
     */
    public void set_Classification(BookInfo bookInfo, int tag1, int tag2){
        Log.d(LogConst.MTAG, "set_Classification()");
        bookInfo.tag1 = tag1;
        bookInfo.tag2 = tag2;
        dao.shelfTable.update_BookInfo(bookInfo);
    }

}
